<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\widgets\Pjax;
use yii\widgets\LinkPager;

/* @var $this yii\web\View */
/* @var $searchModel frontend\modules\resource\models\LabelSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '标签管理';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="hl-label-index">

    <div class="searchBody">
        <div class="addBtn">
            <?= Html::a('新增标签', 'javascript:;', ['class' => 'btn btn-success create']) ?>
        </div>
    </div>
    <?php Pjax::begin(['id' => 'centerView']); ?>


    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            'id',
            'title',
            'created_at',

            //功能
            [
                'class' => 'frontend\modules\common\models\ActionJsColumn',
                'template' => '{update}{delete}',
            ]
        ],
        'pager' => [
            'class' => LinkPager::className(),
            'firstPageLabel' => '首页',
            'prevPageLabel' => '《',
            'nextPageLabel' => '》',
            'lastPageLabel' => '尾页',
            //            'goPageLabel' => true,
            //            'totalPageLable' => '共x页',
            //            'goButtonLable' => 'GO',
            'maxButtonCount' => 5,
            'hideOnSinglePage' => false,
        ]
    ]); ?>
    <?php Pjax::end(); ?>
</div>
<!--增删改 操作-->
<?php echo $this->render('../../../common/views/base/_column2'); ?>
